import 'package:flutter_test/flutter_test.dart';
import 'package:linphone_flutter/linphone_flutter.dart';
import 'package:linphone_flutter/linphone_flutter_platform_interface.dart';
import 'package:linphone_flutter/linphone_flutter_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockLinphoneFlutterPlatform 
    with MockPlatformInterfaceMixin
    implements LinphoneFlutterPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final LinphoneFlutterPlatform initialPlatform = LinphoneFlutterPlatform.instance;

  test('$MethodChannelLinphoneFlutter is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelLinphoneFlutter>());
  });

  test('getPlatformVersion', () async {
    LinphoneFlutter linphoneFlutterPlugin = LinphoneFlutter();
    MockLinphoneFlutterPlatform fakePlatform = MockLinphoneFlutterPlatform();
    LinphoneFlutterPlatform.instance = fakePlatform;
  
    expect(await linphoneFlutterPlugin.getPlatformVersion(), '42');
  });
}
